import React from 'react';
import { Menu } from 'antd';
const { SubMenu } = Menu;
import {
  SolutionOutlined,
  MenuUnfoldOutlined,
  MenuFoldOutlined,
  UserOutlined,
  BookOutlined,
  TeamOutlined,
  LineChartOutlined,
  FormOutlined,
  CalendarOutlined,
} from '@ant-design/icons';
import { history, Link } from 'umi';


export default function StudentMenu() {
    return (
      <>
        <Menu
          mode="inline"
          defaultSelectedKeys={[history.location.pathname]}
          defaultOpenKeys={[
            history.location.pathname.slice(
              0,
              history.location.pathname.indexOf('/', 8),
            ),
          ]}
        >
          <Menu.Item key="/student/learn" icon={<UserOutlined />}>
            <Link to="/student/learn">课程学习</Link>
          </Menu.Item>
          <Menu.Item key="/student/stuLearn" icon={<UserOutlined />}>
            <Link to="/student/stuLearn">学习进度</Link>
          </Menu.Item>
          <Menu.Item key="/changePassword" icon={<TeamOutlined />}>
          <Link to="/changePassword">修改密码</Link>
        </Menu.Item>
        </Menu>
      </>
    );
  }